package com.factory.manager.pojo;

import com.factory.common.bean.Manager;
import com.factory.common.pojo.Result;
import com.factory.common.utils.StringUtil;

import java.util.Optional;

/**
 * TODO
 *
 * @author JW
 * @version 1.0
 * @date 2020/10/30 15:11
 */
public class ManagerPojo extends Manager {

    @Override
    protected Optional<Result> vInsert() {
        return super.vInsert();
    }

    @Override
    protected Optional<Result> vDelete() {
        return super.vDelete();
    }

    @Override
    protected Optional<Result> vUpdate() {
        if(StringUtil.isEmpty(getId())){
            return Optional.of(Result.fail("id不能为空!"));
        }
        return super.vUpdate();
    }

    @Override
    protected Optional<Result> vQuery() {
        return super.vQuery();
    }

    @Override
    protected Optional<Result> vQueryList() {
        return super.vQueryList();
    }

    private String tempProfile;

    public String getTempProfile() {
        return tempProfile;
    }

    public void setTempProfile(String tempProfile) {
        this.tempProfile = tempProfile;
    }
}
